
import com.weed.client.component.ext.Div;
import com.weed.client.component.ext.RLoading;
import com.weed.client.components.outlook.ROutlook;
import com.weed.client.components.outlook.ROutlookItem;
import com.weed.client.components.skin.BlueSkinResource;
import com.weed.client.components.skin.ResourceInterface;
import com.weed.client.components.util.SkinUtil;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.ArrayList;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.util.grid.DataGrid;


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TestOutlookHeader.java
 *
 * Created on 2010-7-17, 22:38:33
 */

/**
 *
 * @author Jason
 */
public class TestOutlookHeader extends javax.swing.JFrame {
   String[] columns = {"code","name","icon","parentcode","action"};
   Object[][] data = new Object[][]{
        {"001","组件演示","images1/item.png",null,""},
        {"002","组件演示","images/item.png","001",""}, 
        {"003","选择组件","images/item.png","002","com.weed.client.sample.JCheckBoxPanel"},
        {"004","输入组件","images/item.png","002","com.weed.client.sample.InputComponent"},
        {"010","工具栏","images/item.png","002","com.weed.client.sample.RToolbarPane"},
        {"005","树型组件","images/item.png","002","com.weed.client.sample.JCheckTreePanel"},
        {"007","综合应用","images/item.png","002","com.weed.client.sample.RCommonPane"},
        {"010","综合应用2","images/item.png",null,"com.weed.client.sample.RCommonPane"},
        {"011","综合应用2","images/item.png","010","com.weed.client.sample.RCommonPane"},
        {"007","综合应用2","images/item.png","011",""}
    };
    DataGrid dataGrid = new DataGrid(data,columns);
    public TestOutlookHeader() {
        initComponents();
//        this.setIconImage(new ImageIcon(ResourceInterface.class.getResource("images/item.png")).getImage());
        this.setBounds(0,0,1024,768);
//        skinPanel2.setSkinIndex("topcomponent");
//        XOutlook look= mainPane1.getOutlook();
//           XOutlookItem[] items = new XOutlookItem[5];
//                for (int index = 0; index < items.length; index++) {
//                       items[index] = new XOutlookItem();
//                       items[index].setIcon( SkinUtil.getImageIcon("images/style_fxy.gif",492,132,509,149));
//                       items[index].setText("系统管理1" + (index+1));
//                       items[index].setToolTip("Test...");
//                       items[index].setShrinked(true);
//
//                }
//        Icon icon =  SkinUtil.getImageIcon("images/style_fxy.gif",492,132,509,149);
//        Icon selectedIcon = SkinUtil.getImageIcon("images/style_fxy.gif",492,132,509,149);
//        look.addBar("小强是最好的", icon, selectedIcon, items);
//        look.addBar("强强A", icon, selectedIcon, items);
//        look.addBar("强大A", icon, selectedIcon, items);
//        look.addBar("很强B", icon, selectedIcon, items);
        this.mainPane1.setSrcColumn("code,name,icon,parentcode,action");
        this.mainPane1.setDataGrid(dataGrid);
       // look.addBar("又来一个测试", icon, selectedIcon, items);
//        this.xOutlookHeader2.addButton( SkinUtil.getImageIcon("xujun/control/Images/toolbar/add.png"),"TEST", null, null);
//        this.xOutlookHeader2.addButton( SkinUtil.getImageIcon("xujun/control/Images/toolbar/email.png"),"TEST", null, null);
//        this.xOutlookHeader2.addButton( SkinUtil.getImageIcon("xujun/control/Images/toolbar/home.png"),"TEST", null, null);
        this.setExtendedState(JFrame.MAXIMIZED_BOTH);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        mainPane1 = new com.weed.client.login.MainPane();

        jLabel1.setText("jLabel1");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("组件演示");
        setExtendedState(1);

        mainPane1.setDataGrid(null);
        mainPane1.setFont(new java.awt.Font("宋体", 0, 14)); // NOI18N
        mainPane1.setSrcColumn("<未设置>");
        getContentPane().add(mainPane1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
         java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {  
                //UIManager.setLookAndFeel("com.weed.swing.plaf.WeedLookAndFeel");
                 JFrame.setDefaultLookAndFeelDecorated(true);
                 javax.swing.JDialog.setDefaultLookAndFeelDecorated(true);
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                UIManager.put(SkinUtil.SKIN_CLASS,new BlueSkinResource());
                new TestOutlookHeader().setVisible(true);
                 } catch (Exception ex) {
                     Logger.getLogger(TestOutlookHeader.class.getName()).log(Level.SEVERE, null, ex);
                  }
                }
        });
       
       

    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private com.weed.client.login.MainPane mainPane1;
    // End of variables declaration//GEN-END:variables

}
